package com.xbn.xbnmall.cart.vo;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author XBN
 * @date 2020/8/14 14:21
 * @email 78742541@qq.com
 */
/*
* 购物项
* */

public class CartItem {
    @Getter @Setter
    private Long skuId;
    @Getter @Setter
    private Boolean check=true; //该购物车中的商品当前是否是被选中状态
    @Getter @Setter
    private String title;
    @Getter @Setter
    private String image;
    @Getter @Setter
    private List<String> skuAttr;
    @Getter @Setter
    private BigDecimal price;//价格
    @Getter @Setter
    private Integer count;
    private BigDecimal totalPrice;//购物车总价

    public BigDecimal getTotalPrice() {
        totalPrice=this.price.multiply(new BigDecimal(""+count));
        return totalPrice;

    }


}
